<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Anesthetic Effectiveness</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="R.css" />
</head><body>

<table width="100%" summary="page for anesthetic"><tr><td>anesthetic</td><td style="text-align: right;">R Documentation</td></tr></table>

<h2>Anesthetic Effectiveness</h2>

<h3>Description</h3>

<p>Thirty patients were given an anesthetic agent maintained
at a predetermined level (conc) for 15 minutes before making
an incision.  It was then noted whether the patient
moved, i.e. jerked or twisted.  
</p>


<h3>Usage</h3>

<pre>anesthetic</pre>


<h3>Format</h3>

<p>This data frame contains the following columns:
</p>

<dl>
<dt>move</dt><dd><p>a binary numeric vector coded for 
patient movement (0 = no movement, 1 = movement)</p>
</dd>
<dt>conc</dt><dd><p>anesthetic concentration</p>
</dd>
<dt>logconc</dt><dd><p>logarithm of concentration</p>
</dd>
<dt>nomove</dt><dd><p>the complement of move</p>
</dd>
</dl>



<h3>Details</h3>

<p>The interest is in estimating
how the probability of jerking or twisting varies with
increasing concentration of the anesthetic agent.
</p>


<h3>Source</h3>

<p>unknown
</p>


<h3>Examples</h3>

<pre>
print("Logistic Regression - Example 8.1.4")

z &lt;- table(anesthetic$nomove, anesthetic$conc)
tot &lt;- apply(z, 2, sum)         # totals at each concentration
prop &lt;- z[2,  ]/(tot)           # proportions at each concentration
oprop &lt;- sum(z[2,  ])/sum(tot)  # expected proportion moving if concentration had no effect
conc &lt;- as.numeric(dimnames(z)[[2]])
plot(conc, prop, xlab = "Concentration", ylab = "Proportion", xlim = c(.5,2.5),
    ylim = c(0, 1), pch = 16)
chw &lt;- par()$cxy[1]
text(conc - 0.75 * chw, prop, paste(tot), adj = 1)
abline(h = oprop, lty = 2)

pause()

anes.logit &lt;- glm(nomove ~ conc, family = binomial(link = logit),
  data = anesthetic)
anova(anes.logit)
summary(anes.logit)

</pre>


</body></html>
